home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 038a / bas_int1.zip / CLR.BAS < prev    next >
BASIC Source File  |  1991-03-02  |  2KB  |  50 lines

  1. '==============================================================
  2. 'CLR.BAS
  3. '
  4. 'Charles Graham, POB 58634, St. Louis, MO 63158
  5. '
  6. 'Here's fancy a new way to clear your screen.  You can use the
  7. 'following code as a substitute for CLS.  Be sure to invoke
  8. 'QuickBASIC with the /l option -- qb/l -- so you can access
  9. 'SUB interrupt.  The screen seems to tear.
  10. '================================================================
  11.  
  12. TYPE regtype
  13.      ax    AS INTEGER
  14.      bx    AS INTEGER
  15.      cx    AS INTEGER
  16.      dx    AS INTEGER
  17.      bp    AS INTEGER
  18.      si    AS INTEGER
  19.      di    AS INTEGER
  20.      flags AS INTEGER
  21. END TYPE
  22. DECLARE SUB interrupt (intnum AS INTEGER, inreg AS regtype, _
  23.                        outreg AS regtype)
  24. DIM inreg AS regtype, outreg AS regtype
  25. DEFINT A-Z
  26. FOR x = 1 TO 25
  27.     inreg.ax = &H601                         'scroll up 1 line
  28.     inreg.bx = &H700                         'white on black
  29.     inreg.cx = &H0                           'row =  0, col =  0
  30.     inreg.dx = &H1813                        'row = 24, col = 19
  31.     CALL interrupt(&H10, inreg, outreg)
  32.     inreg.ax = &H601                         'scroll up 1 line
  33.     inreg.bx = &H700                         'white on black
  34.     inreg.cx = &H28                          'row =  0, col = 40
  35.     inreg.dx = &H183B                        'row = 24, col = 59
  36.     CALL interrupt(&H10, inreg, outreg)
  37.     inreg.ax = &H701                         'scroll down 1 line
  38.     inreg.bx = &H700                         'white on black
  39.     inreg.cx = &H14                          'row =  0, col = 20
  40.     inreg.dx = &H1827                        'row = 24, col = 39
  41.     CALL interrupt(&H10, inreg, outreg)
  42.     inreg.ax = &H701                         'scroll down 1 line
  43.     inreg.bx = &H700                         'white on black
  44.     inreg.cx = &H3C                          'row =  0, col = 60
  45.     inreg.dx = &H184F                        'row = 24, col = 79
  46.     CALL interrupt(&H10, inreg, outreg)
  47. NEXT x
  48. LOCATE 1, 1, 1
  49.  
  50.